/**
 * 
 */
package co.edu.udem.service;

/**
 * @author Sergio Granada
 * 
 * @25/01/2012
 */
public abstract class GenericDTO {

	/** Define the double quotes. */
	public String DOUBLE_QUOTES = "\"";

	/** Define the double COMMA. */
	public String COMMA = ", ";
	
	public abstract void writeValuesToStringBuilder(StringBuilder stringBuilder);

	/**
	 * Add value to format.
	 * 
	 * @param atributte
	 * @param addComma
	 * @return
	 */
	public String appendValueFormat(Object atributte, Boolean addComma) {
		StringBuilder result = new StringBuilder("");
		result.append(DOUBLE_QUOTES);
		result.append(atributte);
		result.append(DOUBLE_QUOTES);
		if (addComma) {
			result.append(COMMA);
		}
		return result.toString();
	}
}
